var t = getApp(), a = (t.globalData.url, require("../../../utils/util.js"));

Page({
    data: {
        dataList: [],
        length: !1
    },
    onLoad: function(t) {
        this.fetchdata();
    },
    fetchdata: function() {
        var e = this, n = t.globalData.token;
        a.request(t, "wx/cust/getOrderByCustIdAndOrderState", "POST", {
            token: n
        }, function(t) {
            var n = t.data.length > 0;
            if (e.setData({
                length: n
            }), t.data.length > 0) {
                var r = t.data;
                for (var d in r) r[d].debateAmount = a.convertMath(r[d].debateAmount);
                e.setData({
                    dataList: r
                });
            }
        }, function(t) {});
    },
    toPayTap: function(t) {
        wx.navigateTo({
            url: "/pages/service/order-topay/index?id=" + t.currentTarget.dataset.id
        });
    },
    orderInfo: function(t) {
        var a = t.currentTarget.dataset.id;
        wx.navigateTo({
            url: "../orderInfo/index?id=" + a
        });
    }
});